import sbt.Keys.libraryDependencies

name := "zhengxuankun"
version := "0.1"
val commonSettings = Seq(
  scalaVersion := "2.13.6",
  resolvers += "Aliyun Apache-snapshots" at "https://maven.aliyun.com/repository/apache-snapshots",
  resolvers += "Aliyun Public" at "https://maven.aliyun.com/repository/public",
  resolvers += "Cloudera Repository" at "https://repository.cloudera.com/artifactory/cloudera-repos/",
  libraryDependencies += "org.apache.logging.log4j" % "log4j-core" % "2.14.1" % Provided,
  // https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api-scala
  libraryDependencies += "org.apache.logging.log4j" %% "log4j-api-scala" % "12.0" % Compile
)

lazy val task1 = (project in file("0711"))
  .settings(
    name := "zhengxuankun_0711",
    commonSettings,
    version := "1.0",
    // https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common
    libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "3.0.0-cdh6.3.2" % Provided,
    // https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-mapreduce-client-core
    libraryDependencies += "org.apache.hadoop" % "hadoop-mapreduce-client-core" % "3.0.0-cdh6.3.2" % Provided,
    // https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-mapreduce-client-common
    libraryDependencies += "org.apache.hadoop" % "hadoop-mapreduce-client-common" % "3.0.0-cdh6.3.2" % Provided
  )

lazy val task2 = (project in file("0718"))
  .settings(
    name := "zhengxuankun_0718",
    commonSettings,
    version := "1.0",
    // https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common
    libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "3.0.0-cdh6.3.2" % Provided
  )

lazy val task3 = (project in file("0725"))
  .settings(
    name := "zhengxuankun_0725",
    commonSettings,
    version := "1.0",
    // https://mvnrepository.com/artifact/org.apache.hbase/hbase-client
    libraryDependencies += "org.apache.hbase" % "hbase-client" % "2.1.0-cdh6.3.2" % Provided
  )

lazy val task4 = (project in file("0801"))
  .settings(
    name := "zhengxuankun_0801",
    commonSettings,
    version := "1.0"
  )

lazy val task5 = (project in file("0815"))
  .settings(
    name := "zhengxuankun_0815",
    commonSettings,
    scalaVersion := "2.12.14",
    version := "1.0",
    // https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common
    libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "3.0.0-cdh6.3.2" % Provided,
    // https://mvnrepository.com/artifact/org.apache.spark/spark-core
    libraryDependencies += "org.apache.spark" %% "spark-core" % "3.1.2" % Provided
  )

lazy val task6 = (project in file("0829"))
  .settings(
    name := "zhengxuankun_0829",
    commonSettings,
    scalaVersion := "2.12.14",
    version := "1.0",
    // https://mvnrepository.com/artifact/org.apache.spark/spark-core
    libraryDependencies += "org.apache.spark" %% "spark-core" % "3.1.2" % Provided,
    // https://mvnrepository.com/artifact/org.apache.spark/spark-sql
    libraryDependencies += "org.apache.spark" %% "spark-sql" % "3.1.2" % Provided,
    // https://mvnrepository.com/artifact/org.apache.spark/spark-catalyst
    libraryDependencies += "org.apache.spark" %% "spark-catalyst" % "3.1.2" % Provided
  )

lazy val task7 = (project in file("0908"))
  .settings(
    name := "zhengxuankun_0908",
    commonSettings,
    scalaVersion := "2.12.14",
    version := "1.0",
    // https://mvnrepository.com/artifact/org.apache.spark/spark-core
    libraryDependencies += "org.apache.spark" %% "spark-core" % "3.1.2" % Provided,
    // https://mvnrepository.com/artifact/org.apache.spark/spark-sql
    libraryDependencies += "org.apache.spark" %% "spark-sql" % "3.1.2" % Provided,
    // https://mvnrepository.com/artifact/org.apache.spark/spark-catalyst
    libraryDependencies += "org.apache.spark" %% "spark-catalyst" % "3.1.2" % Provided,
    // https://mvnrepository.com/artifact/org.apache.spark/spark-hive
    libraryDependencies += "org.apache.spark" %% "spark-hive" % "3.1.2" % Provided
  )

lazy val task8 = (project in file("0919"))
  .settings(
    name := "zhengxuankun_0919",
    commonSettings,
    version := "1.0",
    // https://mvnrepository.com/artifact/io.prestosql/presto-jdbc
    libraryDependencies += "io.prestosql" % "presto-jdbc" % "338" % Provided
  )

lazy val task9 = (project in file("1017"))
  .settings(
    name := "zhengxuankun_1017",
    commonSettings,
    scalaVersion := "2.12.14",
    version := "1.0",
    // https://mvnrepository.com/artifact/org.apache.spark/spark-core
    libraryDependencies += "org.apache.spark" %% "spark-core" % "3.1.2" % Provided,
    // https://mvnrepository.com/artifact/org.apache.spark/spark-sql
    libraryDependencies += "org.apache.spark" %% "spark-sql" % "3.1.2" % Provided,
    // https://mvnrepository.com/artifact/org.apache.spark/spark-catalyst
    libraryDependencies += "org.apache.spark" %% "spark-catalyst" % "3.1.2" % Provided
  )